package week8;

public class Transport {
    private String name;
    private int speed;
    public Transport(String name, int speed) {
        this.name = name;
        this.speed = speed;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public Transport(){
    }

    public void showInfo(){
        System.out.println("交通工具:" + name);
        System.out.println(name+"速度是:" + speed);
    }
    public void moveWay(){
        System.out.println("moveway");
    }



}
